<template>
	<view class="content padding">
		<view class="color_six text_g">
			<u-parse :content="content"></u-parse>
		</view>
		<view class="flexcenter placeholderBoxTop" v-if="!content">
			<image class="placeholderBox" src="/static/placeholderimg.png" mode=""></image>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				// content: "",
				type:1,//1关于我们，2用户协议，3隐私政策，4注销协议
				shopInfo:{}
			}
		},
		async onLoad(options) {
			this.type = options.type
			uni.setNavigationBarTitle({
			    title: options.type == 1 ? '关于我们' : options.type == 2 ? '用户协议' :options.type == 3 ? '隐私政策' :(options.type == 4 ?"注销协议":"示例说明") 
			   });
			let res=await this.initApp()
			this.shopInfo=res.data
		},
		computed: {
			content(){
				if(this.type==1){
					return this.shopInfo.sys_user_about
				}else if(this.type==2){
					return this.shopInfo.sys_user_agree
				}else if(this.type==3){
					return this.shopInfo.sys_user_privacy
				}else if(this.type==4){
					return this.shopInfo.sys_user_cancel
				}else{
					return this.shopInfo.goods_attr
				}
			},
		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>

</style>